# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Jonathan Steel <jsteel@aur.archlinux.org>
# Contributor: Justin "juster" Davis <jrcd83@gmail.com>
# Contributor: François Charette <francois.archlinux.org>

pkgname=perl-xml-libxml
pkgver=2.0208
pkgrel=1
pkgdesc="Interface to the libxml library"
arch=('x86_64')
url="https://search.cpan.org/dist/XML-LibXML"
license=('GPL')
depends=('perl-alien-libxml2' 'perl-xml-sax' 'perl-xml-namespacesupport')
checkdepends=('perl-test-pod' 'perl-test-leaktrace' 'perl-cpan-changes' 'perl-uri')
provides=('perl-libxml' 'perl-xml-libxml-common')
replaces=('perl-libxml' 'perl-xml-libxml-common')
options=('!emptydirs')
install=perl-xml-libxml.install
source=(https://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-$pkgver.tar.gz)
sha512sums=('b8407359b9111b43247cc57b6e9e54c4e99402c9b7e939e49beb752be8fd1ce0e31a98e07dd5d1f7eaa7e37aae25571c38a14792f9e5a64c1533a0387c71423d')

build() {
  cd XML-LibXML-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd XML-LibXML-$pkgver
  make test
}

package() {
  cd XML-LibXML-$pkgver
  make pure_install doc_install DESTDIR="$pkgdir"/
}
